package com.example.his.api.mis.controller.form.dept;

import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class InsertDeptForm {
  
  @NotBlank(message = "deptName不能为空")
  @Pattern(regexp = "^[a-zA-Z0-9\\u4e00-\\u9fa5]{2,20}$", message = "deptName格式错误")
  private String deptName;
  
  @Pattern(regexp = "^1[0-9]{10}$", message = "tel格式错误")
  private String tel;
  
  @Email
  private String email;
  
  @Pattern(regexp = "^[a-zA-Z0-9\\u4e00-\\u9fa5]{1,20}$", message = "desc格式错误")
  private String desc;
}
